------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/oyvindskorge/Dropbox/Papers/Giani-Hope-Skorge/7-Replicatio
> n/log_01_data.log
  log type:  text
 opened on:  11 Feb 2021, 20:11:42

. do "/Users/oyvindskorge/Dropbox/Papers/Giani-Hope-Skorge/7-Replication/01_da
> ta.do"

. **** DATA ****
. 
. * make sure to set your directory and install iscogen
. // cd "setyourparentfolder"
. // ssc install iscogen
. 
. 
. clear all

. use ESSround9.dta

.         
. *CLEANING DATA
. 
. iscogen  Job =  siops(isco08) ,  from(isco08)   

    variable name:          Job
    variable label:         Recode of isco08: isco08 to siops
    storage type:           double
    matched observations:   32441
    unmatched observations: 0
    missing observations:   3574

. iscogen  Job_partner=  siops(isco08p) ,  from(isco08)   

    variable name:          Job_partner
    variable label:         Recode of isco08p: isco08 to siops
    storage type:           double
    matched observations:   12241
    unmatched observations: 0
    missing observations:   23774

.  
. rename hhmmb Household_size

. gen Dad_Edu = eiscedf
(3,117 missing values generated)

. replace Dad_Edu=. if Dad_Edu==55
(136 real changes made, 136 to missing)

. gen Mum_Edu = eiscedm
(2,124 missing values generated)

. replace Mum_Edu=. if Mum_Edu==55
(77 real changes made, 77 to missing)

. 
. gen Parents_gap=Dad_Edu-Mum_Edu
(3,933 missing values generated)

. 
. replace gndr2=0 if gndr2==.a | gndr2==.
(8,168 real changes made)

. replace gndr3=0 if gndr3==.a | gndr3==.
(20,837 real changes made)

. replace gndr4=0 if gndr4==.a | gndr4==.
(27,114 real changes made)

. replace gndr5=0 if gndr5==.a | gndr5==.
(32,873 real changes made)

. replace gndr6=0 if gndr6==.a | gndr6==.
(34,882 real changes made)

. replace gndr7=0 if gndr7==.a | gndr7==.
(35,580 real changes made)

. replace gndr8=0 if gndr8==.a | gndr8==.
(35,790 real changes made)

. replace gndr9=0 if gndr9==.a | gndr9==.
(35,877 real changes made)

. replace gndr10=0 if gndr10==.a | gndr10==.
(35,917 real changes made)

. replace gndr11=0 if gndr11==.a | gndr11==.
(35,934 real changes made)

. replace gndr12=0 if gndr12==.a | gndr12==.
(35,981 real changes made)

. replace gndr13=0 if gndr13==.a | gndr13==.
(36,007 real changes made)

. replace gndr14=0 if gndr14==.a | gndr14==.
(36,014 real changes made)

. replace gndr15=0 if gndr15==.a | gndr15==.
(36,014 real changes made)

. 
. gen gender_share=(gndr2+gndr3+gndr4+gndr5+gndr6+gndr7+gndr8+gndr9+gndr10+gnd
> r11+gndr12+gndr13+gndr14+gndr15)/(2*Household_size)
(145 missing values generated)

. 
. rename prewhp Interfere

. la var gender_share "Share of female at home"

.  
. gen Female=gndr

. 
. rename brncntr Immigrant

. 
. gen  Treatment=2-admge
(5 missing values generated)

. 
. rename agea Age

. 
. rename domicil Domicile

. 
. recode hinctnta (".b"=0 Refusal), gen(Income)
(4828 differences between hinctnta and Income)

. 
. rename rshpsts maritalstatus

. 
. rename nbthcld Child

. 
. replace Child = 0 if Child==.a
(11,068 real changes made)

. 
. rename blgetmg Minority

. 
. gen  Interviewe_Female= intgndr-1

. la var Interviewe_Female "Female interviewer"

. la var intagea "Age of interviewer"

. la var Interfere "Partner interference"

.  
. la def immi2  0 "Control" 1 "Treatment" , modify

. la val Treatment immi2

. 
. *     Approve if person has  full-time job while children aged under 3
. gen Bad_job=5-aftjbyc
(724 missing values generated)

. la var Bad_job "Disapprove full-time job with children<3"

. 
. gen Job_diff=Job-Job_partner
(24,187 missing values generated)

. 
. label var Domicile "Domicile"

. label var Job_diff "Prestige inequality"

. label var Age "Age"

. label var Minority "Ethnic minority"

. label var Domicile "Rural area"

. label var Job "Occupational prestige"

.  
. rename uempla Unemployed

. label var Unemployed "Unemployed"

. rename uemplap Unemployed_partner

. label var Unemployed_partner "Partner unemployed"

. rename hswrkp Housework_partner

. label var Housework_partner "Partner doing housework"

. rename emprelp Employment_partner

. label var Employment_partner "Partner type of employment"

. label var Child "Had children"

. rename ppltrst Trust

. la var Trust "Generalized trust"

. rename rlgdgr Religiosity

. la var Religiosity "Religiosity"

. la var Income "Income"

.  
. gen Age_sq=Age*Age
(167 missing values generated)

. la var Age_sq "Squared Age"

. la def x 0 "Strongly approve" 1 "Approve" 2 "Neutral" 3 "Disapprove" 4 "Stro
> ngly disapprove", replace

. la val Bad_job x

. 
. label var Treatment "Gender bias"

. 
. save ESSgenderUpdate1.dta, replace      
file ESSgenderUpdate1.dta saved

. 
end of do-file

. log close
      name:  <unnamed>
       log:  /Users/oyvindskorge/Dropbox/Papers/Giani-Hope-Skorge/7-Replicatio
> n/log_01_data.log
  log type:  text
 closed on:  11 Feb 2021, 20:11:51
------------------------------------------------------------------------------
